<template>
  <div class="header-radio w-full mt-2 mb-2 flex items-center">
    <div class="w-10 h-10">
      <img class="w-full h-full" :src="radioInfo?.avatarUrl" alt="">
    </div>
    <div class="flex items-center ml-2 text-sm flex-1 ">
      <span class="yu-textColor-hover" @click="jumpUser(radioInfo?.userId)">{{ radioInfo?.nickname }}</span>
      <img class="ml-1 w-4 h-4" :src="radioInfo?.avatarDetail?.identityIconUrl" alt="">
    </div>
  </div>
</template>

<script setup>
import {useRouter} from "vue-router";

const router = useRouter()
defineProps({
  radioInfo: Object
})

// 跳转到用户页面
const jumpUser = (id) => {
  router.push({
    path: '/user/homepage',
    query: {
      id
    }
  })
}
</script>

<style scoped>

</style>
